<!--正文导航-->
<!DOCTYPE html>
<html lang="zh-cn">
    <head>
        <meta charset="utf-8">
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
        <meta content="telephone=no" name="format-detection" /> 
        <meta name="google-site-verification" content="DVVM1p1HEm8vE1wVOQ9UjcKP--pNAsg_pleTU5TkFaM">
        <style>
            body > a:first-child,body > a:first-child img{ width: 0px !important; height: 0px !important; overflow: hidden; position: absolute}
            body{padding-bottom: 0 !important;}
        </style>
        <meta id="viewport" name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
        <title>我的学习课程</title>
		<link rel="stylesheet" href="{OSSURL}public/mobile/css/weixin.css?{php echo time()}">
        <link rel="stylesheet" href="{OSSURL}public/mobile/css/reset.css?{php echo time()}">
        <script src="{OSSURL}public/mobile/js/jquery.js?{php echo time()}"></script>
</head>
<body>

    <div id="wrap" class="teacher_inf">
        <dl id="main">
            <dd class="teacher_inf">
                <div class="teacher">
                    <div style=" background-image:url({php echo tomedia($school['logo']);})"></div>
                </div>
                <ul>
                    <li><label></label>我的学习课程</li>
                    <li><label>我的年级：</label>{$category[$xq_id]['sname']}</li>
                    <li><label>我的班级：</label><span>{$category[$bj_id]['sname']}</span></li>
                </ul>  				
                <div style="clear:both"></div>
            </dd>
            <dd class="teacher_count">
                <h3>课程列表</h3>
                <ul>
				{loop $list $item}
                           <li class="{if $item['end'] < TIMESTAMP}closed{/if}" href="#">
                                <h4>{$item['name']}</h4>{if $item['is_hot'] == 1}<p>精品课</p>{/if}
                                <span> {php echo date('Y/m/d',$item['start'])}-{php echo date('Y/m/d',$item['end'])}</span>
                                <span> {if !empty($category[$item['bj_id']])}{$category[$item['bj_id']]['sname']}{/if}</span>
                                <span> {if !empty($category[$item['km_id']])}{$category[$item['km_id']]['sname']}{/if}</span>
                                <!--通过hot、add和new分别设置热报、正在报名和新增 -->
								{if $item['end']<TIMESTAMP}
								<div class="hot">
                                    <div style="font-size:12px;">已完</div>                                   
                                    <a href="{php echo $this->createMobileUrl('kcinfo', array('id' => $item['id'], 'schoolid' =>$item['schoolid']), true)}">查看详情</a>
                                </div>
								{else}
                                <div class="add">
                                    <div style="font-size:12px;">{php echo pdo_fetchcolumn("select count(*) FROM ".tablename('wx_school_kcbiao')." WHERE kcid = '".$item['id']."'")}节</div>
                                    <span>剩余{php echo pdo_fetchcolumn("select count(*) FROM ".tablename('wx_school_kcbiao')." WHERE date>'".TIMESTAMP."' And kcid = '".$item['id']."'")}节</span>
                                    <a href="{php echo $this->createMobileUrl('kcinfo', array('id' => $item['id'],'schoolid' =>$item['schoolid']), true)}">查看详情</a>
                                </div>
								{/if}
                           </li>
				{/loop}		   
                </ul>


            </dd>

        </dl>
    </div>
	   {php include $this->template('footer');}  
    <script>
        $(document).ready(function(e) {
            $("#wrap").css("min-height", $(document).height())
        });
    </script>
</body>
</html>